/* $Header: p_wkfile.h,v 2.2 01/10/02 10:30:35 przybyls Exp $ */

/***********************************************************************/
/* INCLUDE FILE NAME:                                                  */
/* ==================                                                  */
/*                                                                     */
/* Author:                                                             */
/*                                                                     */
/* COMMENT:                                                            */
/*                                                                     */
/*                                                                     */
/*                                                                     */
/*                                                                     */
/***********************************************************************/

#ifndef P_WKFILE_H
#define P_WKFILE_H

#include <p_config.h> 

/*****************************/
/*   IFDEFS                  */
/*****************************/


/*****************************/
/*   SYMBOLIC CONSTANTS      */
/*****************************/


/*****************************/
/*   MACROS                  */
/*****************************/


/*****************************/
/*   TYPEDEFS                */
/*****************************/





typedef struct INLET_WKFILE_STRUCT
       {
             ON_OFF                On_Off;

             INJ_MODE              Injection_Mode; /* split, splitless, pulsed */

             U_INT32               Inlet_Pressure;    /* when not connected to a defined column */
             U_INT32               Total_Inlet_Flow;  /* when not connected to a defined column */

                                                      /*  Next parm(s) related to reducing pneu upset that's caused by  */ 
                                                      /*   switching of sample intro valve that is typically used with */
                                                      /*   the Volatiles Inlet ( i.e. head space, purge&trap, ...      */
             U_INT32               VI_Ntp_Avg_Total_Flow;
                                                      /* Need this avg b/c VI fwd_pres PIDs => more noise            */
             INT16                 VI_Avg_Cntr;       /* to tally iterations of VI filter once PREP.and.READY==1     */

             U_INT32               VI_Ntp_Total_Flow; /* VI_Inj_Flow is not available via keybd or host ...          */
             INT32                 VI_Inj_Time;       /* # sec.s after START RUN to hold FWD_FLOW_NO_PRES pcb2 mode  */
                                                      /*     and VI_Injection_Flow setpt.                            */
             INT32                 VI_Inj_Time_Save;  /* Save sampling_end parm b/c going to SPLIT mode where not used */
             INJ_MODE              VI_Inj_Mode_Save;  /* Save last choice from plumbed state here : split, splitless */
/*           BIT8                  VI_Auto_Cal_Save;     Save last choice to auto-cal flow at run's end during DIRECT */


             U_INT32               Purge_Flow;        /* Splitless parms */
             INT32                 Purge_Time;

             INT32                 Pulse_Time;        /* Pulsed Splitless Parms */
             U_INT16               Pressure_Pulse_Pressure;

             INT32                 Vent_Time;
             U_INT32               Vent_Flow;
             U_INT16               Vent_Pressure;

             U_INT32               Split_Ratio;

             ON_OFF                Miser_Mode;
             U_INT32               Miser_Flow;     /* Total Inlet Flow During Miser Setting */
             INT32                 Miser_Time;     /* Run Time When Flow Swithed To Miser Value */

             INT32                 Flow_Equib_Time;
             INT32                 Pres_Equib_Time;

       } INLET_WKFILE, *pINLET_WKFILE;





typedef struct COLUMN_WKFILE_STRUCT
        {

               CONTROL_MODE        Control_Mode;  /* which setpt are we controling to */
                                                  /* pres and flow setpts come from the ramp generator */
                                                  /* const flow for undefined columns is done here.    */

               RAMPTBL             Ramp_Init_And_Post_Values;
               RAMPS               Ramp_Rates[ RAMP_LEVELS ];


        } COLUMN_WKFILE, *pCOLUMN_WKFILE;




typedef struct
        {

          ON_OFF                   On_Off;       

          U_INT32                  Desired_Flow;     

        } DET_GAS_WKFILE, *pDET_GAS_WKFILE;




typedef struct DETECTOR_WKFILE_STRUCT
        {
             DET_GAS_WKFILE        Gas_1;
             DET_GAS_WKFILE        Gas_2;
             DET_GAS_WKFILE        Gas_3;

             ON_OFF                Constant_Total_Makeup;

             U_INT32               Desired_Total_Makeup_Flow;

        } DETECTOR_WKFILE, *pDETECTOR_WKFILE;





typedef struct AUX_WKFILE_STRUCT
       {
             ON_OFF          On_Off;

             U_INT16         Desired_Pressure;

             INT32           Pres_Equib_Time;

             RAMPTBL         Ramp_Init_And_Post_Values;
             RAMPS           Ramp_Rates[ RAMP_LEVELS ];

       } AUX_WKFILE, *pAUX_WKFILE;






typedef struct PNEU_WKFILE_STRUCT
        {
               INLET_WKFILE               Frnt_Inlet;
               INLET_WKFILE               Back_Inlet;

               COLUMN_WKFILE              Column_1;
               COLUMN_WKFILE              Column_2;

               DETECTOR_WKFILE            Frnt_Detector;
               DETECTOR_WKFILE            Back_Detector;

               AUX_WKFILE                 Aux_3;
               AUX_WKFILE                 Aux_4;
               AUX_WKFILE                 Aux_5;

        } PNEU_WKFILE, *pPNEU_WKFILE;



#endif
